package com.qy127.controller;

import com.qy127.dao.DeptDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("/dept")
public class DeptController {

    @Autowired
    private DeptDao deptDao;

    /**
     * 查询所有的部门名字
     * @return
     */
    @RequestMapping("/queryAllDname")
    public List<Map<String, Object>> queryAllDname(){
        List<Map<String, Object>> maps = deptDao.queryAllDeptDname();
        return maps;
    }
}
